﻿<%@ Page Language="C#" MasterPageFile="~/design/Anonym.Master" AutoEventWireup="true"
    CodeBehind="Umelci.aspx.cs" Inherits="Zadani09.Umelci" Title="Přehled umělců" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentVrchniPlaceholder" runat="server">
    <h3 style="font-size: small; margin-top: 10px;">
        Přehled všech umělců</h3>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline">
        <ContentTemplate>
            <asp:TextBox ID="TextBox1" runat="server">
            </asp:TextBox>
            <cc1:AutoCompleteExtender ID="TextBox1_AutoCompleteExtender" runat="server" DelimiterCharacters=""
                Enabled="True" ServicePath="" TargetControlID="TextBox1" UseContextKey="True"
                ServiceMethod="GetCompletionList" MinimumPrefixLength="1">
            </cc1:AutoCompleteExtender>
            
            <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
                <asp:ListItem Value="id_umelec" Text="ID umělce"></asp:ListItem>
                <asp:ListItem Value="jmeno" Text="Jméno"></asp:ListItem>
                <asp:ListItem Value="prijmeni">Přijmení</asp:ListItem>
                <asp:ListItem Value="popis" Text="Popis"></asp:ListItem>
                <asp:ListItem Value="dlouhy_popis" Text="Dlouhý popis"></asp:ListItem>
                <asp:ListItem Value="ulice" Text="Ulice"></asp:ListItem>
                <asp:ListItem Value="popisne" Text="Číslo popisné"></asp:ListItem>
                <asp:ListItem Value="mesto" Text="Město"></asp:ListItem>
                <asp:ListItem Value="psc" Text="PSČ"></asp:ListItem>
            </asp:DropDownList>
        </ContentTemplate>
    </asp:UpdatePanel>
    &nbsp;
    <asp:Button ID="Button1" runat="server" Text="Vyhledat" Font-Size="12px" 
        onclick="Button1_Click" />
        
    <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Small"></asp:Label>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
        BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" CellPadding="2"
        DataKeyNames="IDUmelec" DataSourceID="ObjectDataSource1" ForeColor="Black" 
        GridLines="None" CssClass="mar_top_3" Width="740px">
        <FooterStyle BackColor="Tan" />
        <Columns>
            <asp:CommandField SelectText="Detail" ShowSelectButton="True">
                <ItemStyle Font-Bold="True" />
            </asp:CommandField>
            <asp:BoundField DataField="IDUmelec" HeaderText="ID" 
                SortExpression="IDUmelec" Visible="False" />
            <asp:BoundField DataField="Jmeno" HeaderText="Jméno" SortExpression="Jmeno" />
            <asp:BoundField DataField="Prijmeni" HeaderText="Příjmení" 
                SortExpression="Prijmeni" />
            <asp:BoundField DataField="Ulice" HeaderText="Ulice" SortExpression="Ulice" />
            <asp:BoundField DataField="Popisne" HeaderText="Č.p." 
                SortExpression="Popisne" />
            <asp:BoundField DataField="Mesto" HeaderText="Město" SortExpression="Mesto" />
            <asp:BoundField DataField="PSC" HeaderText="PSČ" SortExpression="PSC" />
            <asp:BoundField DataField="DlouhyPopis" HeaderText="DlouhyPopis" 
                SortExpression="DlouhyPopis" Visible="False" />
            <asp:BoundField DataField="Popis" HeaderText="Popis" SortExpression="Popis" 
                Visible="False" />
        </Columns>
        <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
        <HeaderStyle BackColor="Tan" Font-Bold="True" />
        <AlternatingRowStyle BackColor="PaleGoldenrod" />
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
        SelectMethod="cti_s_vyhledavanim" 
        TypeName="Zadani09.db.ODS.UmelecDataObject">
        <SelectParameters>
            <asp:Parameter Name="razeni" Type="String" />
            <asp:ControlParameter ControlID="TextBox1" Name="hledano" PropertyName="Text" 
                Type="String" />
            <asp:ControlParameter ControlID="DropDownList1" DefaultValue="id_umelec" 
                Name="atribut" PropertyName="SelectedValue" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:Label ID="Label2" runat="server" Text="<h3>Detailní informace o umělci</h3>"
        Visible="False"></asp:Label>
    <asp:FormView ID="FormView1" runat="server" BackColor="LightGoldenrodYellow" BorderColor="Tan"
        BorderWidth="1px" CellPadding="2" DataSourceID="ObjectDataSource2" ForeColor="Black"
        Width="394px">
        <FooterStyle BackColor="Tan" />
        <EditItemTemplate>
            DlouhyPopis:
            <asp:TextBox ID="DlouhyPopisTextBox" runat="server" Text='<%# Bind("DlouhyPopis") %>' />
            <br />
            IDUmelec:
            <asp:TextBox ID="IDUmelecTextBox" runat="server" Text='<%# Bind("IDUmelec") %>' />
            <br />
            Jmeno:
            <asp:TextBox ID="JmenoTextBox" runat="server" Text='<%# Bind("Jmeno") %>' />
            <br />
            Prijmeni:
            <asp:TextBox ID="PrijmeniTextBox" runat="server" Text='<%# Bind("Prijmeni") %>' />
            <br />
            Mesto:
            <asp:TextBox ID="MestoTextBox" runat="server" Text='<%# Bind("Mesto") %>' />
            <br />
            Popis:
            <asp:TextBox ID="PopisTextBox" runat="server" Text='<%# Bind("Popis") %>' />
            <br />
            Popisne:
            <asp:TextBox ID="PopisneTextBox" runat="server" Text='<%# Bind("Popisne") %>' />
            <br />
            PSC:
            <asp:TextBox ID="PSCTextBox" runat="server" Text='<%# Bind("PSC") %>' />
            <br />
            Ulice:
            <asp:TextBox ID="UliceTextBox" runat="server" Text='<%# Bind("Ulice") %>' />
            <br />
            Serie:
            <asp:TextBox ID="SerieTextBox" runat="server" Text='<%# Bind("Serie") %>' />
            <br />
            UmelecDilo:
            <asp:TextBox ID="UmelecDiloTextBox" runat="server" Text='<%# Bind("UmelecDilo") %>' />
            <br />
            UzivatelUmelec:
            <asp:TextBox ID="UzivatelUmelecTextBox" runat="server" Text='<%# Bind("UzivatelUmelec") %>' />
            <br />
            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
                Text="Update" />
            &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False"
                CommandName="Cancel" Text="Cancel" />
        </EditItemTemplate>
        <InsertItemTemplate>
            DlouhyPopis:
            <asp:TextBox ID="DlouhyPopisTextBox" runat="server" Text='<%# Bind("DlouhyPopis") %>' />
            <br />
            IDUmelec:
            <asp:TextBox ID="IDUmelecTextBox" runat="server" Text='<%# Bind("IDUmelec") %>' />
            <br />
            Jmeno:
            <asp:TextBox ID="JmenoTextBox" runat="server" Text='<%# Bind("Jmeno") %>' />
            <br />
            Prijmeni:
            <asp:TextBox ID="PrijmeniTextBox" runat="server" Text='<%# Bind("Prijmeni") %>' />
            <br />
            Mesto:
            <asp:TextBox ID="MestoTextBox" runat="server" Text='<%# Bind("Mesto") %>' />
            <br />
            Popis:
            <asp:TextBox ID="PopisTextBox" runat="server" Text='<%# Bind("Popis") %>' />
            <br />
            Popisne:
            <asp:TextBox ID="PopisneTextBox" runat="server" Text='<%# Bind("Popisne") %>' />
            <br />
            PSC:
            <asp:TextBox ID="PSCTextBox" runat="server" Text='<%# Bind("PSC") %>' />
            <br />
            Ulice:
            <asp:TextBox ID="UliceTextBox" runat="server" Text='<%# Bind("Ulice") %>' />
            <br />
            Serie:
            <asp:TextBox ID="SerieTextBox" runat="server" Text='<%# Bind("Serie") %>' />
            <br />
            UmelecDilo:
            <asp:TextBox ID="UmelecDiloTextBox" runat="server" Text='<%# Bind("UmelecDilo") %>' />
            <br />
            UzivatelUmelec:
            <asp:TextBox ID="UzivatelUmelecTextBox" runat="server" Text='<%# Bind("UzivatelUmelec") %>' />
            <br />
            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
                Text="Insert" />
            &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"
                CommandName="Cancel" Text="Cancel" />
        </InsertItemTemplate>
        <ItemTemplate>
            <table>
                <tr>
                    <td>
                        <strong>Jméno:</strong>
                    </td>
                    <td>
                        <asp:Label ID="JmenoLabel" runat="server" Text='<%# Bind("Jmeno") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>Příjmení:</strong>
                    </td>
                    <td>
                        <asp:Label ID="PrijmeniLabel" runat="server" Text='<%# Bind("Prijmeni") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>Ulice:</strong>
                    </td>
                    <td>
                        <asp:Label ID="UliceLabel" runat="server" Text='<%# Bind("Ulice") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>Číslo popisné:</strong>
                    </td>
                    <td>
                        <asp:Label ID="PopisneLabel" runat="server" Text='<%# Bind("Popisne") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>Město:</strong>
                    </td>
                    <td>
                        <asp:Label ID="MestoLabel" runat="server" Text='<%# Bind("Mesto") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>PSČ:</strong>
                    </td>
                    <td>
                        <asp:Label ID="PSCLabel" runat="server" Text='<%# Bind("PSC") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>Popis:</strong>
                    </td>
                    <td>
                        <asp:Label ID="PopisLabel" runat="server" Text='<%# Bind("Popis") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        <strong>Podrobnější popis:</strong>
                    </td>
                    <td>
                        <asp:Label ID="DlouhyPopisLabel" runat="server" Text='<%# Bind("DlouhyPopis") %>' />
                    </td>
                </tr>
            </table>
        </ItemTemplate>
        <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
        <HeaderStyle BackColor="Tan" Font-Bold="True" />
        <EditRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
    </asp:FormView>
    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" OldValuesParameterFormatString="original_{0}"
        SelectMethod="ctiJednoho" TypeName="Zadani09.db.ODS.UmelecDataObject">
        <SelectParameters>
            <asp:ControlParameter ControlID="GridView1" DefaultValue="0" Name="id" PropertyName="SelectedValue"
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>
